package com.wang.service;

import com.wang.mapper.EmployeeMapper;
import com.wang.pojo.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author admin
 */
@Service
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    EmployeeMapper employeeMapper;
    @Override
    public List<Employee> getEmp() {
        return employeeMapper.getEmp();
    }

    @Override
    public int updEmpById(Employee employee) {
        return employeeMapper.updEmpById(employee);
    }

    @Override
    public int saveEmp(Employee employee) {
        return employeeMapper.saveEmp(employee);
    }

    @Override
    public int deleteEmp(int id) {
        return employeeMapper.deleteEmp(id);
    }

    @Override
    public Employee getEmpById(int id) {
        return employeeMapper.getEmpById(id);
    }
}
